PageSpinner Includes


Tips & Hints

Tips and Hints

Editing Files Containing Include Comments

Site maintenance

Files vs. Notebook Pages

Keeping JavaScript in Include Files and Pages

Back to Index Page

Editing Files Containing Include Comments

To insert an Include comment
Use the menu item Paste Include... in the Edit menu to insert an Include comment tag pair.

To open an Include File
Select the name of the include file in the editor. Use the menu item Open Selection in the File menu to quickly open the Include file that is beeing included. This feature is especially useful if you have an hierarchy of multiple Include folders or include files with the same names.

Editing pages in other editors
If you are editing pages containing include comments with other editors that don't display HTML comments, you need to remember which parts of the page that are inserted by PageSpinner's Includes.


Site maintenance

PageSpinner's hierarcic structure of Include Files and the includable Notebook pages make it easier to edit and organize the contents of large web sites.

But to really harness the include's full power you will need a way to easily update all pages when an Include file has been changed. This can be done by using AppleScript. In PageSpinner's AppleScript menu you will find a script named Update Include Files in Folder.... This script automatically updates all files in a specific folder that contains an include comment. With the use of AppleScript it is possible to write more advanced scripts, such as updating all folders in an entire site.


Files vs. Notebook Pages

The advantages with using Include files or Notebook pages:

Include files are:
- easy to transfer between different machines and systems
- easy to share between co-workers
- easier to backup than the Notebook contents
- enables hierarchic structure of include files

Notebook pages are:
- easy to access and maintain in the Notebook window


Keeping JavaScript in Include Files and Pages

A very handy usage of PageSpinner's Includes, is to keep a collection of frequently used JavaScripts in an include file or Notebook page, and have an include comment on the pages that should use the scripts.

This makes it easy to develop and enhance several pages that rely on a set of JavaScripts. Although JavaScript has some support for accessing scripts in other files, there are several restrictions on what such script can do, so including the same scripts on every page is currently the only way to get full functionality of JavaScript.

Files placed inside the global Include folder (in PageSpinner's application folder) are possible to include in any page you edit with PageSpinner. This enables you to keep a collection of useful JavaScripts available to all pages you create. JavaScript files should end with .js if they are placed in an Include folder. There is an example file called time.js in the global Include folder.

Back to Index Page

Last updated: 6:20 PM , 6/2/97
© 1995-1997 Jerry ≈man.